/**
 * 泛娱区块链 - NewWestItem
 * http://menger.me
 * @大梦
 */

'use strict';

import React, {Component} from 'react'
import {StyleSheet, Text, View, TouchableOpacity, Image} from 'react-native'


export default class NewWestItem extends Component {

    constructor(props) {
        super(props);
        this.state = {};
    }

    static defaultProps = {
    	item: {
    		title: '',
    		img: '',
    	},
    	style: null,
    	onPress: () => {},
    }

    render() {
    	let {style, onPress, item} = this.props;
        return (
            <TouchableOpacity
            	style={[styles.container, style]}
            	onPress={onPress}
            >
                <View style={styles.itemView}>
                    <Image
                    	style={styles.image}
                    	source={item.img ? {uri: item.img} : Images.img_bg_west1}
                    />
                    <Text style={styles.title}>{item.title}我是一个标题栏</Text>
                </View>
            </TouchableOpacity>
        );
    }
}

const styles = StyleSheet.create({
    container: {},
    itemView: {
        paddingHorizontal: 15,
        paddingVertical: 5,
    },
    image: {
        width: Theme.screenWidth - 30,
        height: 120,
        borderRadius: 5,
    },
    title: {
        top: 104,
        left: 31,
        color: "#fff",
        position: 'absolute',
        fontSize: FontSize(13),
    }
});